#
# Be sure to run `pod lib lint iCJModules.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |s|
  s.name             = 'iCJModules'
  s.version          = '0.5.0'
  s.summary          = '一些功能模块.'

# This description is used to generate tags and improve search results.
#   * Think: What does it do? Why did you write it? What is the focus?
#   * Try to keep it short, snappy and to the point.
#   * Write the description between the DESC delimiters below.
#   * Finally, don't worry about the indent, CocoaPods strips it!

  s.description      = 'iOS开发常用的功能模块'

  s.homepage         = 'https://gitee.com/ChaoJinYu/iCJModules'
  # s.screenshots     = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
  s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { 'ChaoJinYu' => '674267489@qq.com' }
  s.source           = { :git => 'https://gitee.com/ChaoJinYu/iCJModules.git', :tag => s.version.to_s }
  # s.social_media_url = 'https://gitee.com/ChaoJinYu/iCJModules'

  s.ios.deployment_target = '9.0'

  #s.source_files = 'iCJModules/Classes/LBS/Base/*.{h,m}'
  
  s.static_framework = true
  s.pod_target_xcconfig = { 'VALID_ARCHS' => 'x86_64 armv7 arm64' } # 如果只编译一种处理器的的代码，会报错
  
  #位置服务模块
  s.subspec 'LBS' do |ss|

    ss.subspec 'Base' do |sss|
      sss.source_files = 'iCJModules/Classes/LBS/Base/*'
      sss.dependency 'AMapFoundation', '~> 1.6.3'
    end

    ss.subspec 'Search' do |sss|
      sss.source_files = 'iCJModules/Classes/LBS/Search/*'
      sss.dependency 'AMapSearch', '~> 6.9.0'
      sss.dependency 'iCJModules/LBS/Base'
    end

    ss.subspec 'Location' do |sss|
      sss.source_files = 'iCJModules/Classes/LBS/Location/*'
      sss.dependency 'AMapLocation', '~> 2.6.3'
      sss.dependency 'iCJModules/LBS/Base'
    end

#    ss.subspec 'Map' do |sss|
#      sss.source_files = 'iCJModules/Classes/LBS/Map/**/*'
#      sss.dependency 'AMap3DMap', '~> 6.9.0'
#      sss.dependency 'iCJModules/LBS/Base'
#      sss.dependency 'iCJModules/LBS/Search'
#    end

#    ss.subspec 'Navigation' do |sss|
#      sss.source_files = 'iCJModules/Classes/LBS/Navigation/*'
#      sss.dependency 'AMapNavi', '~> 6.9.1'
#      sss.dependency 'iCJModules/LBS/Base'
#    end

  end

  # 推送模块
  s.subspec 'APNs' do |ss|
    ss.source_files = 'iCJModules/Classes/APNs/*'
    ss.dependency 'JPush', '~>3.2.4'
  end
  
  # 支付授权登陆模块
  s.subspec 'WaAp' do |ss|
    ss.source_files = 'iCJModules/Classes/WaAp/*'
    ss.dependency 'WechatOpenSDK', '~> 1.8.6.2'
    ss.dependency 'AlipaySDK-iOS', '~> 15.6.8'
  end
  
  # 分享模块
  s.subspec 'Share' do |ss|
    ss.source_files = 'iCJModules/Classes/Share/*'
    ss.dependency 'mob_sharesdk','~> 4.3.7'
    ss.dependency 'mob_sharesdk/ShareSDKPlatforms/QQ'
    ss.dependency 'WechatOpenSDK', '~> 1.8.6.2'
  end
  
  # 选择
  s.subspec 'Picker' do |ss|
    ss.source_files = 'iCJModules/Classes/Picker/*'
    ss.resource_bundles = {
       'iCJModules' => ['iCJModules/Classes/Picker/Assets/*.xib']
    }
  end
  
  # 长连接
  s.subspec 'LongLink' do |ss|
    ss.source_files = 'iCJModules/Classes/LongLink/*'
    ss.dependency 'CocoaAsyncSocket'
    ss.dependency 'iCJTools'
  end
  
  # 请求
  s.subspec 'Request' do |ss|
    ss.source_files = 'iCJModules/Classes/Request/*'
    ss.dependency 'AFNetworking'
  end
  
  # s.resource_bundles = {
  #   'iCJModules' => ['iCJModules/Assets/*.png']
  # }

  # s.public_header_files = 'Pod/Classes/**/*.h'
  # s.frameworks = 'UIKit', 'MapKit'
  # s.dependency 'AFNetworking', '~> 2.3'
  # s.dependency 'AMapFoundation', '~> 1.6.3'
  
end
